package org.example.sdpback.utils;

/**
 * @className: ThreadLocalUtil
 * @author: zxy
 * @date: 2024/11/3 18:38
 * @Version: 1.0
 * @description: 创建一个ThreadLocal工具类
 **/
public class ThreadLocalUtil {
    private static final ThreadLocal threadLocal = new ThreadLocal();

    public static void set(Object data) {
        threadLocal.set(data);
    }

    public static <T> T get() {
        return (T) threadLocal.get();
    }

    public static void remove() {
        threadLocal.remove();
    }

}
